package com.mtzqc.common.livebus

import androidx.lifecycle.Observer
import com.jeremyliao.liveeventbus.LiveEventBus

class BusObserver<T>(val key: String, val observer: Observer<T>) : Observer<T> by observer {
    fun unRegister() {
        LiveEventBus.get<T>(key).removeObserver(this)
    }
}